//
//  Good_Table_Header_Cell.m
//  Food
//
//  Created by dllo on 15/7/18.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Good_Table_Header_Cell.h"
#import "UIImageView+WebCache.h"
#import "BaseHeader.h"
@implementation Good_Table_Header_Cell

-(void)dealloc
{
    [_lable release];
    [_instrLable release];
    [_image release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.lable = [[UILabel alloc] init];
        self.lable.backgroundColor = [UIColor colorWithRed:0.16 green:0.4 blue:0.18 alpha:1];
        [self.lable setTextColor:[UIColor whiteColor]];
        self.lable.font = [UIFont systemFontOfSize:20];
        [self.lable setTextAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:self.lable];
        
        self.instrLable = [[UILabel alloc] init];
        self.instrLable.backgroundColor = [UIColor whiteColor];
        [self.instrLable setTextColor:[UIColor colorWithRed:0.16 green:0.4 blue:0.18 alpha:1]];
        [self.contentView addSubview:self.instrLable];
        
        self.image = [[UIImageView alloc] init];
        self.image.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.image];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.lable.frame = CGRectMake(20, 10, 60 / 375.0 * ScreenWidth, 50);
    self.instrLable.frame = CGRectMake(20 + 60 / 375.0 * ScreenWidth, 10, 225 / 375.0 * ScreenWidth, 50);
    self.image.frame = CGRectMake(305 / 375.0 * ScreenWidth, 10, 50 / 375.0 * ScreenWidth, 50);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
